import request from '@/utils/request'

export function getLoginAuth(params: any) {
	return request({
		url: '/interface/token/ssoNew',
		method: 'get',
		params: params,
		headers: {
			token: 'no-auth',
		},
	})
}

// 获取近半年数据
export function getWarningCount() {
	return request({
		url: '/twoVolations/warningCount',
		method: 'post',
		data: {
			eventTypeId: 44,
			areaCode: '510185',
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取违建量排行榜
export function getRanking(data) {
	return request({
		url: '/twoVolations/ranking',
		method: 'post',
		data: {
			...data,
			eventTypeId: 44,
			areaCode: '510185',
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取违建量排行榜
export function getTrend(data) {
	return request({
		url: '/twoVolations/trend',
		method: 'post',
		data: {
			...data,
			eventTypeId: 44,
			areaCode: '510185',
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取违建列表
export function getList(data: any) {
	return request({
		url: '/twoVolations/agriEventList',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取违建属地列表
export function getAreaList() {
	return request({
		url: '/interface/getGridNameList',
		method: 'post',
		data: {
			rankNum: '2',
			gridId: '510185',
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}

// 获取调度详情
export function getProcessDetail(data: any) {
	return request({
		url: '/twoVolations/agriEventInfo',
		method: 'post',
		data: {
			eventTypeId: 44,
			areaCode: '510185',
			...data,
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取调度历史列表
export function getLogList() {
	return request({
		url: '/twoVolations/dispatchList',
		method: 'post',
		data: {
			eventTypeId: 44,
		},
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 获取某个事件调度历史
export function getDispatchInfo(data: any) {
	return request({
		url: '/twoVolations/dispatchInfo',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}

//  获取短信/云呼记录
export function getRecordList(data: any) {
	return request({
		url: '/twoVolations/smsList',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}

// 获取部门列表
export function getDeptList(data: any) {
	return request({
		url: '/twoVolations/deptList',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}

// 发起调度
export function initDispatch(data: any) {
	return request({
		url: '/twoVolations/initiateDispatch',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
// 再次调度/提级调度
export function againDispatch(data: any) {
	return request({
		url: '/twoVolations/againDispatch',
		method: 'post',
		data: data,
		// headers: {
		// 	Authorization: 'no-auth',
		// },
	})
}
